<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<%@ page import="com.msmall.community.space.util.SpaceConstants" language="java"%>
<c:set var="SPACE_WIDGET_PART_ALBUM" value="<%=SpaceConstants.SPACE_WIDGET_PART_ALBUM%>"></c:set>

<form id="f_album_valid" action="<c:url value='/album/valid.do'/>" method="POST" >
	<input id="album_id" name="albumid" value="${albumid}" type="hidden"/>
	
	请输入密码:
	<input id="album_password" name="password" size="6" class="input"/>
	<br/>
	<button class="btn1" type="button" name="submitAlbumValid" onclick="javascript:submitAlbumValidForm();">保存</button>
</form>
<script>
function submitAlbumValidForm(){
	$.ajax({
		type : "POST",
		url : ctx + "/album/valid.do",
		data : $("#f_album_valid").serialize(),
		dataType:"xml", 
		timeout:20000,
		success : function(data){
			if($(data).find('result').text().toUpperCase().indexOf("TRUE") >= 0){
				spaceAlbumList('<c:out value="${albumid}"/>');
				$.fn.colorbox.close();
			}else{
				alert("密码错误！");
			}
		},
		error: function(){
		}
	});
}
</script>